Class symantec.itools.multimedia.SlideShow
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class symantec.itools.multimedia.SlideShow

Object
   |
   +----Component
           |
           +----Container
                   |
                   +----symantec.itools.multimedia.SlideShow

public class SlideShow
extends Container
This is a basic graphical image "slide show" component. Displays a series of images with descriptive text.

Version:
1.1, August 1, 1997
Author:
Symantec

Variable Index

 o descriptions
The displayed image descriptions.
 o errors
Error strings.
 o imageIndex
The zero-relative index of the currently displayed image.
 o imageViewer
The sub-component that displays the images.
 o images
The displayed images, loaded from the image URL list.
 o isReshapeHack
Internal utility flag.
 o urlList
The URLs of the images to display.

Constructor Index

 o symantec.itools.multimedia.SlideShow()
Constructs a new SlideShow.

Method Index

 o addActionListener(ActionListener)
Adds the specified action listener to receive action events from this button.
 o addImageAndDescription(URL, String)
Add an image URL and associated description to the slide show image set.
 o addImageWithDescription(Image, String)
Add an Image and associated description to the slide show image set.
 o addPropertyChangeListener(PropertyChangeListener)
Adds a listener for all event changes.
 o addVetoableChangeListener(VetoableChangeListener)
Adds a vetoable listener for all event changes.
 o display()
 o getCurrentImageIndex()
Return the current image index being displayed.
 o getDescription(int)
Return the description of the image at the given index.
 o getMinimumSize()
Returns the minimum dimensions to properly display this component.
 o getNumberOfImages()
Return the number of images in the slide show set.
 o getPreferredSize()
Returns the recommended dimensions to properly display this component.
 o getURL(int)
Return the URL of the image at the given index.
 o isAtFirstImage()
Query if displaying first image in slide show set.
 o isAtLastImage()
Query if displaying last image in slide show set.
 o loadImageFromURL(URL)
Loads an image from a given URL System.err's the exception if there was a problem loading the Image.
 o nextImage()
Display the next image in the slide show set.
 o preferredSize()
 o previousImage()
Display the previous image in the slide show set.
 o removeActionListener(ActionListener)
Removes the specified action listener so it no longer receives action events from this button.
 o removePropertyChangeListener(PropertyChangeListener)
Removes a listener for all event changes.
 o removeVetoableChangeListener(VetoableChangeListener)
Removes a vetoable listener for all event changes.
 o reshape(int, int, int, int)
 o setBounds(int, int, int, int)
Reshapes the Component to the specified bounding box.
 o setDescription(int, String)
Set the description of the image at the given index.
 o setFirst(Image)
Reset slide show and add first image.
 o setFirstImage(URL)
Reset slide show and add first image.
 o setImage(int)
Display the image at the given index.
 o sourceActionEvent(String)
Fire an action event to the listeners

Variables

 o descriptions
protected java.util.Vector descriptions
The displayed image descriptions.

See Also:
getDescription, setDescription, addImageAndDescription
 o errors
protected transient java.util.ResourceBundle errors
Error strings.

 o imageIndex
protected int imageIndex
The zero-relative index of the currently displayed image.

See Also:
getCurrentImageIndex, setImage, nextImage, previousImage
 o imageViewer
protected symantec.itools.multimedia.ImageViewer imageViewer
The sub-component that displays the images.

 o images
protected java.util.Vector images
The displayed images, loaded from the image URL list.

See Also:
setFirstImage, addImageAndDescription
 o isReshapeHack
protected boolean isReshapeHack
Internal utility flag.

 o urlList
protected java.util.Vector urlList
The URLs of the images to display.

See Also:
getURL, setFirstImage, addImageAndDescription

Constructors

 o SlideShow
public SlideShow()
Constructs a new SlideShow.

Methods

 o addActionListener
public void addActionListener(ActionListener l)
Adds the specified action listener to receive action events from this button.

Parameters:
l - the action listener
 o addImageAndDescription
public int addImageAndDescription(URL url,
                                  String description)
Add an image URL and associated description to the slide show image set.

Parameters:
url - URL of image file
description - description of image
Returns:
int - index of added image in slide show set
 o addImageWithDescription
public int addImageWithDescription(Image image,
                                   String description)
Add an Image and associated description to the slide show image set.

Parameters:
image - the java.awt.Image to use
description - description of image
Returns:
int - index of added image in slide show set
 o addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener listener)
Adds a listener for all event changes.

Parameters:
PropertyChangeListener - listener the listener to add.
See Also:
removePropertyChangeListener
 o addVetoableChangeListener
public void addVetoableChangeListener(VetoableChangeListener listener)
Adds a vetoable listener for all event changes.

Parameters:
VetoableChangeListener - listener the listener to add.
See Also:
removeVetoableChangeListener
 o display
public void display()
Note: display() is deprecated.

 o getCurrentImageIndex
public int getCurrentImageIndex()
Return the current image index being displayed.

 o getDescription
public java.lang.String getDescription(int index)
Return the description of the image at the given index.

Parameters:
index - index of image to retrieve description of
Returns:
String - description of image at given index
See Also:
setDescription
 o getMinimumSize
public java.awt.Dimension getMinimumSize()
Returns the minimum dimensions to properly display this component. This is a standard Java AWT method which gets called to determine the minimum size of this component.

Returns:
the results from getPreferredSize()
Overrides:
getMinimumSize in class Container
See Also:
getPreferredSize
 o getNumberOfImages
public int getNumberOfImages()
Return the number of images in the slide show set.

 o getPreferredSize
public java.awt.Dimension getPreferredSize()
Returns the recommended dimensions to properly display this component. This is a standard Java AWT method which gets called to determine the recommended size of this component.

Returns:
If no image has been loaded, a dimension of 10 by 10 is returned. If an image has been loaded, the height and width of the image is returned.
Overrides:
getPreferredSize in class Container
See Also:
getMinimumSize
 o getURL
public java.net.URL getURL(int index)
Return the URL of the image at the given index.

Parameters:
index - index of image to retrieve URL of
Returns:
URL - URL of image at given index
 o isAtFirstImage
public boolean isAtFirstImage()
Query if displaying first image in slide show set.

Returns:
boolean - true if displaying first image; false otherwise
See Also:
isAtLastImage
 o isAtLastImage
public boolean isAtLastImage()
Query if displaying last image in slide show set.

Returns:
boolean - true if displaying last image; false otherwise
See Also:
isAtFirstImage
 o loadImageFromURL
protected java.awt.Image loadImageFromURL(URL url)
Loads an image from a given URL System.err's the exception if there was a problem loading the Image.

Parameters:
url - the url referencing the image to load
Returns:
the loaded image
 o nextImage
public int nextImage()
Display the next image in the slide show set. Fires an ActionEvent with the actionCommand of "nextImage" to it's listeners.

See Also:
previousImage
 o preferredSize
public java.awt.Dimension preferredSize()
Note: preferredSize() is deprecated.

Overrides:
preferredSize in class Container
See Also:
getPreferredSize
 o previousImage
public int previousImage()
Display the previous image in the slide show set. Fires an ActionEvent with the actionCommand of "previousImage" to it's listeners.

See Also:
nextImage
 o removeActionListener
public void removeActionListener(ActionListener l)
Removes the specified action listener so it no longer receives action events from this button.

Parameters:
l - the action listener
 o removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)
Removes a listener for all event changes.

Parameters:
PropertyChangeListener - listener the listener to remove.
See Also:
addPropertyChangeListener
 o removeVetoableChangeListener
public void removeVetoableChangeListener(VetoableChangeListener listener)
Removes a vetoable listener for all event changes.

Parameters:
VetoableChangeListener - listener the listener to remove.
See Also:
addVetoableChangeListener
 o reshape
public void reshape(int x,
                    int y,
                    int width,
                    int height)
Note: reshape() is deprecated.

Overrides:
reshape in class Component
See Also:
setBounds
 o setBounds
public void setBounds(int x,
                      int y,
                      int width,
                      int height)
Reshapes the Component to the specified bounding box.

Parameters:
x - the x coordinate
y - the y coordinate
width - the width of the component
height - the height of the component
Overrides:
setBounds in class Component
See Also:
getBounds, setLocation, setSize
 o setDescription
public void setDescription(int index,
                           String str) throws PropertyVetoException
Set the description of the image at the given index.

Parameters:
index - index of description to set
str - description string
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
getDescription
 o setFirst
public void setFirst(Image image)
Reset slide show and add first image.

Parameters:
image - The Image of first slide image, if null slide show is reinitialized
 o setFirstImage
public void setFirstImage(URL url)
Reset slide show and add first image.

Parameters:
url - url of first slide image, if null slide show is reinitialized
 o setImage
public int setImage(int index)
Display the image at the given index.

Parameters:
index - index of the image to display
str - description string
Returns:
int - image index being displayed
 o sourceActionEvent
protected void sourceActionEvent(String actionCommand)
Fire an action event to the listeners

Parameters:
actionCommand - the command name associated with the ActionEvent to fire.

All Packages  Class Hierarchy  This Package  Previous  Next  Index